class CreatePurchaseReq {
  CreatePurchaseReq({
    required this.details,
    required this.generateOrder,
    required this.id,
    required this.remark,
    required this.shipperId,
    required this.supplierId,
    required this.supplierShopId,
    required this.warehouseId,
  });

  ///采购明细
  List<GoodsDetail> details;

  ///是否生成销售订单
  bool? generateOrder;

  ///采购单ID
  int? id;

  ///备注
  String? remark;

  ///货主ID
  int? shipperId;

  ///供应商ID
  int? supplierId;

  ///供应商门店ID
  int? supplierShopId;

  ///仓库ID
  int? warehouseId;
}

class GoodsDetail {
  GoodsDetail({
    required this.goodsCode,
    required this.goodsDetails,
    required this.price,
    required this.serviceCost,
    required this.totalCount,
    required this.totalWeight,
  });

  ///商品编码
  String goodsCode;

  ///单头明细
  List<GoodsCodeDetails> goodsDetails;

  ///采购单价
  int price;

  ///服务费
  int serviceCost;

  ///采购数量
  double totalCount;

  ///采购重量
  int totalWeight;
}

class GoodsCodeDetails {
  GoodsCodeDetails({
    required this.goodsPurchaseCode,
    required this.serviceCost,
    required this.weight,
  });

  ///商品条码
  String goodsPurchaseCode;

  ///服务费
  int serviceCost;

  ///重量
  int weight;
}
